/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cl.bussines.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Vogel
 */
@Entity
@Table(name = "manuales_moto")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "ManualesMoto.findAll", query = "SELECT m FROM ManualesMoto m"),
    @NamedQuery(name = "ManualesMoto.findByIdManualesMoto", query = "SELECT m FROM ManualesMoto m WHERE m.idManualesMoto = :idManualesMoto")})
public class ManualesMoto implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id_Manuales_Moto")
    private Integer idManualesMoto;
    @JoinColumn(name = "id_Moto", referencedColumnName = "id_Moto")
    @ManyToOne(optional = false)
    private Moto idMoto;
    @JoinColumn(name = "id_Manual", referencedColumnName = "id_Manual")
    @ManyToOne(optional = false)
    private Manuales idManual;

    public ManualesMoto() {
    }

    public ManualesMoto(Integer idManualesMoto) {
        this.idManualesMoto = idManualesMoto;
    }

    public Integer getIdManualesMoto() {
        return idManualesMoto;
    }

    public void setIdManualesMoto(Integer idManualesMoto) {
        this.idManualesMoto = idManualesMoto;
    }

    public Moto getIdMoto() {
        return idMoto;
    }

    public void setIdMoto(Moto idMoto) {
        this.idMoto = idMoto;
    }

    public Manuales getIdManual() {
        return idManual;
    }

    public void setIdManual(Manuales idManual) {
        this.idManual = idManual;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idManualesMoto != null ? idManualesMoto.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ManualesMoto)) {
            return false;
        }
        ManualesMoto other = (ManualesMoto) object;
        if ((this.idManualesMoto == null && other.idManualesMoto != null) || (this.idManualesMoto != null && !this.idManualesMoto.equals(other.idManualesMoto))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "cl.bussines.entities.ManualesMoto[ idManualesMoto=" + idManualesMoto + " ]";
    }
    
}
